import math


LCL = 497       # Lifted Condensation Level, in meters
EL = 50684      # Equilibrium Level, in feet
LI = -16        # Lifted Index, in Celsius/Kelvin
FZL = 14625     # Freezing Level, in feet
K = 42          # K Index, in Celsius
MUCAPE = 8261   # Most Unstable CAPE, in J/kg
ESRH = 314      # Effective SRH, in m2/s2

lightningIndex = 3 * math.sqrt((1/50) * math.sqrt((2000 / (LCL + 1000))) * (math.sqrt(0.6 * EL / (FZL + 2500))) * ((((4 * (MUCAPE + 1)))**0.25)) * (((0.5 * (MUCAPE + 1) * (abs(ESRH) + 50))**0.2)) * (math.sqrt(max(K, 1) / 25)) * (((max(-1 * LI, 0.5) / 3)**0.2)) )

# In the example provided, the result should be 10.7912607941856
print("Lightning Index =", lightningIndex)

if (lightningIndex < 1):
    print("(Very Low)")
elif (lightningIndex >= 1 and lightningIndex < 3):
    print("(Low)")
elif (lightningIndex >= 3 and lightningIndex < 5):
    print("(Moderate)")
elif (lightningIndex >= 5 and lightningIndex < 7):
    print("(High)")
elif (lightningIndex >= 7 and lightningIndex < 9):
    print("(Very High)")
elif (lightningIndex >= 9):
    print("(Extreme)")